//
//  NetEaseTitleLayout.h
//  15-NetEaseHomeWork
//
//  Created by DM.C  on 16/8/3.
//  Copyright © 2016年 DM.C . All rights reserved.
//

#import <UIKit/UIKit.h>

@protocol NetEaseTitltLayoutDelegate <NSObject>

/** 根据给定的文字大小计算宽度 */
- (CGFloat)collectionView:(UICollectionView *)collectionView
                   layout:(UICollectionViewLayout *)collectionViewLayout
                   string:(NSString *)string
                stringFont:(UIFont *)font
  widthForItemAtIndexPath:(NSIndexPath *)indexPath;

@end

@interface NetEaseTitleLayout : UICollectionViewLayout
@property (nonatomic, weak) id <NetEaseTitltLayoutDelegate> delegate;
@property (nonatomic, strong) NSString *title;
@property (nonatomic, strong) UIFont *titleFont;
@end
